package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.imaster.enumeration.VisitorRegisterStateRegisterTypeEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 观众预登记信息状态表
 * </p>
 *
 * @author zjn
 * @since 2021-12-13
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("v_visitor_register_state")
@ApiModel(value = "VisitorRegisterState", description = "观众预登记信息状态表")
@AllArgsConstructor
public class VisitorRegisterState extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_id")
    @Excel(name = "展会id")
    private Long exhibitionId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @TableField(value = "user_account_id")
    @Excel(name = "用户id")
    private Long userAccountId;

    /**
     * 观众注册表id
     */
    @ApiModelProperty(value = "观众注册表id")
    @TableField(value = "visitor_register_id")
    @Excel(name = "观众注册表id")
    private Long visitorRegisterId;

    /**
     * 来源 SystemSourceEnum
     */
    @ApiModelProperty(value = "来源 SystemSourceEnum")
    @Size(max = 16, message = "来源 SystemSourceEnum长度不能超过16")
    @TableField(value = "source", condition = LIKE)
    @Excel(name = "来源 SystemSourceEnum")
    private String source;

    /**
     * 审核状态
     */
    @ApiModelProperty(value = "审核状态")
    @Size(max = 16, message = "审核状态长度不能超过16")
    @TableField(value = "audit_state", condition = LIKE)
    @Excel(name = "审核状态")
    private String auditState;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @TableField(value = "audit_time")
    @Excel(name = "审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime auditTime;

    /**
     * 卡号
     */
    @ApiModelProperty(value = "卡号")
    @Size(max = 32, message = "卡号长度不能超过32")
    @TableField(value = "card_number", condition = LIKE)
    @Excel(name = "卡号")
    private String cardNumber;

    /**
     * 展立方观众id
     */
    @ApiModelProperty(value = "展立方观众id")
    @Size(max = 32, message = "展立方观众id长度不能超过32")
    @TableField(value = "sync_visitor_id", condition = LIKE)
    @Excel(name = "展立方观众id")
    private String syncVisitorId;

    /**
     * 注册方式 #{imaster:注册预登记;team:团体预登记;abroad:海外预登记;bzt:B展通}
     */
    @ApiModelProperty(value = "注册方式 #{imaster:注册预登记;team:团体预登记;abroad:海外预登记;bzt:B展通}")
    @TableField(value = "register_type")
    @Excel(name = "注册方式 #{imaster:注册预登记;team:团体预登记;abroad:海外预登记;bzt:B展通}", replace = {"注册预登记_IMASTER", "团体预登记_TEAM", "海外预登记_ABROAD", "B展通_BZT",  "_null"})
    private VisitorRegisterStateRegisterTypeEnum registerType;

    /**
     * 是否是金卡用户：1是；0否
     */
    @ApiModelProperty(value = "是否是金卡用户：1是；0否")
    @TableField(value = "is_golden")
    @Excel(name = "是否是金卡用户：1是；0否")
    private Integer isGolden;

    /**
     * 是否是认证观众：1是；0否
     */
    @ApiModelProperty(value = "是否是认证观众：1是；0否")
    @TableField(value = "is_authentication")
    @Excel(name = "是否是认证观众：1是；0否")
    private Integer isAuthentication;

    /**
     * 是否参加线下：1是；0否
     */
    @ApiModelProperty(value = "是否参加线下：1是；0否")
    @TableField(value = "is_offline")
    @Excel(name = "是否参加线下：1是；0否")
    private Integer isOffline;

    /**
     * 是否完成完善信息：1是；0否
     */
    @ApiModelProperty(value = "是否完成完善信息：1是；0否")
    @TableField(value = "is_complete_info")
    @Excel(name = "是否完成完善信息：1是；0否")
    private Integer isCompleteInfo;

    /**
     * 是否完成问卷：1是；0否
     */
    @ApiModelProperty(value = "是否完成问卷：1是；0否")
    @TableField(value = "is_complete_question")
    @Excel(name = "是否完成问卷：1是；0否")
    private Integer isCompleteQuestion;

    /**
     * 数据来源 pc/app/mini_programs
     */
    @ApiModelProperty(value = "数据来源 pc/app/mini_programs")
    @Size(max = 32, message = "数据来源 pc/app/mini_programs长度不能超过32")
    @TableField(value = "terminal_type", condition = LIKE)
    @Excel(name = "数据来源 pc/app/mini_programs")
    private String terminalType;

    /**
     * 版本信息 
     */
    @ApiModelProperty(value = "版本信息 ")
    @Size(max = 32, message = "版本信息 长度不能超过32")
    @TableField(value = "terminal_device", condition = LIKE)
    @Excel(name = "版本信息 ")
    private String terminalDevice;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;


    @Builder
    public VisitorRegisterState(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long projectId, Long exhibitionId, Long userAccountId, Long visitorRegisterId, String source, 
                    String auditState, LocalDateTime auditTime, String cardNumber, String syncVisitorId, VisitorRegisterStateRegisterTypeEnum registerType, Integer isGolden, 
                    Integer isAuthentication, Integer isOffline, Integer isCompleteInfo, Integer isCompleteQuestion, String terminalType, String terminalDevice, 
                    Integer isEnabled, Integer isDeleted) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.projectId = projectId;
        this.exhibitionId = exhibitionId;
        this.userAccountId = userAccountId;
        this.visitorRegisterId = visitorRegisterId;
        this.source = source;
        this.auditState = auditState;
        this.auditTime = auditTime;
        this.cardNumber = cardNumber;
        this.syncVisitorId = syncVisitorId;
        this.registerType = registerType;
        this.isGolden = isGolden;
        this.isAuthentication = isAuthentication;
        this.isOffline = isOffline;
        this.isCompleteInfo = isCompleteInfo;
        this.isCompleteQuestion = isCompleteQuestion;
        this.terminalType = terminalType;
        this.terminalDevice = terminalDevice;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
    }

}
